// eslint-disable-next-line no-unused-vars
export default (self) => {
  //self => vue的this对象
  return {
    border: true,
    labelWidth: 120,
    column: [
      {
        label: "用户名",
        prop: "username",
        search: true,
        row: true,
        editDisabled: true,
        rules: [
          { required: true, message: '请输入用户名', trigger: 'blur' }
        ]
      },
      {
        label: "角色",
        prop: "roles",
        type: 'select',
        dicData: [],
        rules: [
          { required: true, message: '请输入角色', trigger: 'blur' }
        ]
      },
      {
        label: "密码",
        prop: "password",
        type: 'password',
        hide: true,
        editDisplay: false,
        showColumn: false,
        rules: [
          { required: true, message: '请输入密码', trigger: 'blur' }
        ]
      },
      {
        label: "旧密码",
        prop: "oldPassword",
        type: 'oldPassword',
        hide: true,
        addDisplay: false,
        showColumn: false,

      },
      {
        label: "新密码",
        prop: "newPassword",
        type: 'newPassword',
        hide: true,
        addDisplay: false,
        showColumn: false,

      },
      {
        label: "确认新密码",
        prop: "passwordConfirmation",
        type: 'passwordConfirmation',
        hide: true,
        addDisplay: false,
        showColumn: false,

      },
      {
        label: "状态",
        prop: "status",
        align: "center",
        slot: true,
        display: false,
      },
      {
        label: "注册时间",
        prop: "register_date",
        formatter(r, v) {
          return self.moment(v).format('YYYY-MM-DD HH:mm:ss')
        },
        display: false
      },
      {
        label: "最后登录时间",
        prop: "last_login_date",
        formatter(r, v) {
          return self.moment(v).format('YYYY-MM-DD HH:mm:ss')
        },
        display: false
      },
      {
        label: "最后登录ip",
        prop: "last_login_ip",
        display: false
      }

    ]
  }
}